<nav>
<?php $id = $sf_user->getAttribute('beca_id') ?>
    <?php if($id == ''):?>
        <?php include_partial('menu', array('id'=> 1))?>
    <?php else:?>
        <?php include_partial('menu', array('id'=> $id))?>
    <?php endif;?>
</nav>

<article>
<table class="table">
  <thead>        
    <tr>
        <th colspan="2"><h2 id="titulo_form">RESUMEN DE LA CONVOCATORIA</h2></th>
    </tr>
  </thead>
  <tbody>        
    <tr>
      <th>Id:</th>
      <td><?php echo $beca->getId() ?></td>
    </tr>
    <tr>
      <th>Nombre:</th>
      <td><?php echo $beca->getNombre() ?></td>
    </tr>
    <tr>
      <th>Logo:</th>
      <td><?php echo image_tag('/uploads/logos/'.$beca->getLogo(), 'id=img_logo', 'alt=logo'.$beca->getId()) ?></td>   
    </tr>
    <tr>
      <th><p>Descripcion:</p></th>
      <td><p><?php echo $beca->getDescripcion() ?></p></td>
    </tr>
    <tr>
      <th>Dirigido a:</th>
      <td><?php echo $beca->getDirigidoA() ?></td>
    </tr>
    <tr>
      <th><p>Requisitos:</p></th>
      <td><p id="info"><?php echo $beca->getRequisitos() ?></p></td>
    </tr>
    <tr>
      <th>Plazo:</th>
      <td><?php echo $beca->getPlazo() ?></td>
    </tr>
    <tr>
      <th>Fecha inicio:</th>
      <td><?php echo $beca->getFechaInicio() ?></td>
    </tr>
    <tr>
      <th>Fecha fin:</th>
      <td><?php echo $beca->getFechaFin() ?></td>
    </tr>
    <tr>
      <th>Entidad que convoca:</th>
      <td><?php echo $beca->getEntidad()->getNombre()?></td>
    </tr>    
  </tbody>
  <tfoot>      
  </tfoot>
</table>
<table>
  <tbody>         
    <?php foreach($beca->getAtributosAdicionalesBeca() as $atributo):?>    
    <tr>
      <th><?php echo $atributo->getAtributoId();?></th>    
      <td><p id="info"><?php echo $atributo->getAtributoValor();?></p></td>            
    </tr>
    <?php endforeach;?>
  </tbody>
  <tfoot>
      <?php $sf_user->setAttribute('id', $beca->getId())?>
      <?php $sf_user->setAttribute('email', $sf_user->getAttribute('email'))?>
<!--      <form action="<?php //echo url_for('aplicaciones/index?id='.$beca->getId())?>" method="post">-->
          <form action="<?php echo url_for('aplicaciones/new')?>" method="post">
      
          <tr>
          <td colspan="2"><input type="submit" value="Aplicar a esta beca" /></td>
      </tr>
      </form>
  </tfoot>
</table>    
</article>
<footer></footer>